/* 页面整体容器 */
.comment-container {
    min-height: 100vh;
    background: url('/static/images/2.jpg') center/cover fixed;
    position: relative;
    padding: 40px 20px;
}

/* 半透明遮罩 */
.comment-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
}

/* 内容包装器 */
.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* 页面标题 */
.page-title {
    text-align: center;
    color: #2c3e50;
    font-size: 2.8em;
    margin-bottom: 50px;
    font-weight: bold;
}

.section-title {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 25px;
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 25px;
    background: #3498db;
    border-radius: 2px;
}

/* 评论表单 */
.comment-form-container {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 50px;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    margin: 0;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* 提交按钮 */
.submit-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-end;
}

.submit-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* 评论列表 */
.comments-section {
    margin-top: 50px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.comment-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    font-weight: bold;
}

.user-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1em;
}

.comment-date {
    color: #95a5a6;
    font-size: 0.9em;
}

.comment-content {
    color: #34495e;
    line-height: 1.6;
    font-size: 1.05em;
    padding-left: 55px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .comment-container {
        padding: 20px;
    }

    .page-title {
        font-size: 2.2em;
        margin-bottom: 30px;
    }

    .section-title {
        font-size: 1.5em;
    }

    .comment-form-container {
        padding: 20px;
    }

    .submit-btn {
        width: 100%;
        align-self: center;
    }

    .comment-content {
        padding-left: 0;
        margin-top: 15px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-item {
    animation: fadeIn 0.5s ease-out forwards;
}

/* 错误提示样式 */
.error-message {
    color: #e74c3c;
    font-size: 0.9em;
    margin-top: 5px;
    display: none;
}

/* 成功提示样式 */
.success-message {
    background: rgba(46, 204, 113, 0.2);
    color: #27ae60;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 8px;
}

.page-link {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.page-link.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    cursor: default;
}

/* 确保分页按钮在移动设备上也能正常显示 */
@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
    }
    
    .page-link {
        padding: 6px 10px;
        font-size: 14px;
    }
}

/* 消息样式 */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-info {
    background-color: #cce5ff;
    border-color: #b8daff;
    color: #004085;
}

/* 美化提交按钮 */
.btn-comment {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.btn-comment:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-comment:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* 加载动画 */
.loading-spinner {
    margin-left: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-top: 3px solid transparent;
    border-radius: 50%;
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 评论框样式 */
.form-control {
    border: 1px solid #ddd;
    transition: border-color 0.3s ease;
    margin-bottom: 15px;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* 模态框样式 */
.modal-content {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.modal-header {
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.modal-title {
    color: #333;
    font-size: 1.2rem;
}

.modal-body {
    padding: 20px;
    text-align: center;
}

.modal-footer {
    border-top: 1px solid #eee;
    padding: 15px;
}

.modal-footer .btn-primary {
    background-color: #007bff;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
}

.modal-footer .btn-primary:hover {
    background-color: #0056b3;
}

#danmaku-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.danmaku {
    position: absolute;
    white-space: nowrap;
    color: white;
    text-shadow: 1px 1px 2px black;
    font-size: 20px;
    pointer-events: none;
    user-select: none;
}
